package com.aiju.widgit.dialog;

import android.app.Activity;

/**
 * @version: V1.0
 * @author: 佐为
 * @date: 2016-10-19 10:17
 * @Description: 对话框工具类
 */
public class DialogHelper {

    private WaitDialog dialog;

    public DialogHelper(Activity activity) {
        dialog = new WaitDialog(activity);
        dialog.setCanceledOnTouchOutside(false);
    }

    /**
     * 显示加载对话框
     */
    public void showLoadingProgressDialog() {
        if (dialog.isShowing()){
            return;
        }
        dialog.show();
    }

    /**
     * 隐藏加载对话框
     */
    public void dismissProgressDialog() {
        dialog.dismiss();
    }

}
